<template>
	<view>
		<tui-list-cell v-for="(item,index) in list" :key="index" @click="detail(item.post.id)" :arrow="true">
			{{item.post.post_title}}
		</tui-list-cell>
	</view>
</template>

<script>
	var api = require('@/common/api.js')
	import tuiListCell from "@/components/list-cell/list-cell.vue"
	export default {
		components:{
			tuiListCell
		},
		data() {
			return {
				id:'',
				list:[]
			}
		},
		onLoad(options) {
	
			this.id = options.id;
			
			this.loadList();
		},
		methods: {
			loadList:function(){
				api.get({
					url:"order/new",
					data:{
						id:this.id
					},
					success: res => {
						if(res.code == 1){
							this.list = res.data;
						}
					}
				})
			},
			detail:function(id){
				uni.navigateTo({
					url:'../detail/detail?id='+id
				})
			}
		}
	}
</script>

<style>

</style>
